package com.tmall.tmall.mapper;

import com.mysql.cj.x.protobuf.MysqlxDatatypes;
import com.tmall.tmall.pojo.Slideshow;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SlideshowMapper {
    @Insert("insert into slideshow (title, mainImg, link, sort) value (#{title},#{mainImg},#{link},#{sort})")
    void insert(Slideshow slideshow);

    List<Slideshow> page(String title);

    void update(Slideshow slideshow);

    @Select("select * from slideshow where delete_at is null ")
    List<Slideshow> selectAll();
}
